<?php
define('APPLICATION_PATH',
				realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
    
// Define path to public folder
defined('PUBLIC_PATH')
    || define('PUBLIC_PATH', realpath(dirname(__FILE__)));

//Duong dan den thu muc /templates
define('TEMPLATE_PATH', PUBLIC_PATH . '/templates');

//Duong dan den thu muc /templates
define('TEMPLATE_URL', '/templates');


// Ensure library/ is on include_path, them cac duong dan den cac file model de Zend co the load
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    realpath(APPLICATION_PATH . '/models'),
    APPLICATION_PATH . '/modules',
    get_include_path(),
)));
require_once 'Zend/Application.php' ;
$application = new Zend_Application( 
    APPLICATION_ENV, 
    APPLICATION_PATH . '/configs/application.ini' 
);

$application->bootstrap()
			->run();
